﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class manager_restoreDatabase : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        string path = FileUpload1.FileName;
        path = Server.MapPath(".") + @"\data\" + DateTime.Now.ToString("yyyyMMddHHmmss") + path;
        FileUpload1.SaveAs(path);
        MasApp.BLL.ResponseHelper.RestoreDatabase(path);
        form1.Controls.Clear();
        Label lb = new Label();
        lb.Text = "还原成功，请重新登录！";
        lb.ForeColor = System.Drawing.Color.Red;
        lb.Font.Size = FontUnit.Large;
        form1.Controls.Add(lb);
    }
}
